---@class Table_StoryGuideItem
local Table_StoryGuideItem = BaseClass("Table_StoryGuideItem", IDataItem)

function Table_StoryGuideItem:__ctor()
	---@type number @唯一ID
	self.Id = 0
	---@type number @剧情对话内容ID
	self.StoryContentId = 0
	---@type string @剧情人物资源路径
	self.StoryRes = ""
	---@type string @剧情人物资源名称
	self.StoryImgName = ""
	---@type number @后续剧情ID
	self.NextStoryId = 0
	---@type number @音效ID
	self.SoundId = 0
end

function Table_StoryGuideItem:Load(reader)
	self.temp = reader:ReadShortString()
	self.Id = tonumber(self.temp)
	self.temp = reader:ReadShortString()
	self.StoryContentId = tonumber(self.temp)
	self.StoryRes = reader:ReadString()
	self.StoryImgName = reader:ReadString()
	self.temp = reader:ReadShortString()
	self.NextStoryId = tonumber(self.temp)
	self.temp = reader:ReadShortString()
	self.SoundId = tonumber(self.temp)
end

---@class Table_StoryGuideMgr : IDataMgr
local this = BaseClass("Table_StoryGuideMgr", IDataMgr)

function this:FileName()
	return "Txt/StoryGuide.txt"
end

---@return Table_StoryGuideItem
function this:GetItemByKey(key)
	return self.super.GetItemByKey(self, key)
end

---@return Table_StoryGuideItem
function this:GetItemByIdx(idx)
	return self.super.GetItemByIdx(self, idx)
end

function this:Load(reader)
	local item = Table_StoryGuideItem()
	item:Load(reader)
	self.mItemDic[item.Id] = self.mDataCount
	table.insert(self.mItemList, item)
end

---@type Table_StoryGuideMgr
Table_StoryGuideMgr = this()